package com.ios.palette.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.ios.palette.dao.IUserDAO;
import com.ios.palette.domain.User;

import com.ios.palette.service.IUserService;
@Service("userService")
@Cacheable(value="user")
public class UserServiceImpl extends BaseServiceImpl<User> implements IUserService{
	@Autowired
	private IUserDAO userDao;
	
	public User get(String username){
		return userDao.findByName(username);
	}

	@Override
	public List<User> searchByName(String username) {
		// TODO Auto-generated method stub
		List<User> list=userDao.findByNameLike(username);
		return list;
	}

}
